home *** CD-ROM | disk | FTP | other *** search
/ QuickTime 2.0 Developer Kit / QuickTime 2.0 Developer Kit.iso / mac / MAC / Programming Stuff / Interfaces / CIncludes / Gestalt.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-11  |  26.3 KB  |  808 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        Gestalt.h
  3.  
  4.      Copyright:    © 1984-1994 by Apple Computer, Inc.
  5.                  All rights reserved.
  6.  
  7.      Version:    Universal Interfaces 2.0a3  ETO #16, MPW prerelease.  Friday, November 11, 1994. 
  8.  
  9.      Bugs?:        If you find a problem with this file, send the file and version
  10.                  information (from above) and the problem description to:
  11.  
  12.                      Internet:    apple.bugs@applelink.apple.com
  13.                      AppleLink:    APPLE.BUGS
  14.  
  15. */
  16.  
  17. #ifndef __GESTALT__
  18. #define __GESTALT__
  19.  
  20.  
  21. #ifndef __TYPES__
  22. #include <Types.h>
  23. #endif
  24. /*    #include <ConditionalMacros.h>                                */
  25.  
  26. #ifndef __MIXEDMODE__
  27. #include <MixedMode.h>
  28. #endif
  29.  
  30. #ifdef __cplusplus
  31. extern "C" {
  32. #endif
  33.  
  34. #if GENERATINGPOWERPC
  35. #pragma options align=mac68k
  36. #endif
  37.  
  38. #ifdef __CFM68K__
  39. #pragma lib_export on
  40. #endif
  41.  
  42.  
  43. enum {
  44.     gestaltAddressingModeAttr    = 'addr',                        /* addressing mode attributes */
  45.     gestalt32BitAddressing        = 0,                            /* using 32-bit addressing mode */
  46.     gestalt32BitSysZone            = 1,                            /* 32-bit compatible system zone */
  47.     gestalt32BitCapable            = 2                                /* Machine is 32-bit capable */
  48. };
  49.  
  50. enum {
  51.     gestaltAliasMgrAttr            = 'alis',                        /* Alias Mgr Attributes */
  52.     gestaltAliasMgrPresent        = 0,                            /* True if the Alias Mgr is present */
  53.     gestaltAliasMgrSupportsRemoteAppletalk = 1                    /* True if the Alias Mgr knows about Remote Appletalk */
  54. };
  55.  
  56. enum {
  57.     gestaltAppleTalkVersion        = 'atlk'
  58. };
  59.  
  60. enum {
  61.     gestaltAUXVersion            = 'a/ux'
  62. };
  63.  
  64. enum {
  65.     gestaltCloseViewAttr        = 'BSDa',                        /* CloseView attributes */
  66.     gestaltCloseViewEnabled        = 0,                            /* Closeview enabled (dynamic bit - returns current state) */
  67.     gestaltCloseViewDisplayMgrFriendly = 1                        /* Closeview compatible with Display Manager (FUTURE) */
  68. };
  69.  
  70. enum {
  71.     gestaltCFMAttr                = 'cfrg',                        /* returns information about the Code Fragment Manager */
  72.     gestaltCFMPresent            = 0                                /* true if the Code Fragment Manager is present */
  73. };
  74.  
  75. enum {
  76.     gestaltColorMatchingAttr    = 'cmta',                        /* ColorSync attributes */
  77.     gestaltHighLevelMatching    = 0,
  78.     gestaltColorMatchingLibLoaded = 1
  79. };
  80.  
  81. enum {
  82.     gestaltColorMatchingVersion    = 'cmtc',
  83.     gestaltColorSync10            = 0x0100,                        /* 0x0100 & 0x0110 _Gestalt versions for 1.0-1.0.3 product */
  84.     gestaltColorSync11            = 0x0110,                        /*   0x0100 == low-level matching only */
  85.     gestaltColorSync104            = 0x0104,                        /* Real version, by popular demand */
  86.     gestaltColorSync105            = 0x0105
  87. };
  88.  
  89. enum {
  90.     gestaltConnMgrAttr            = 'conn',                        /* connection mgr attributes    */
  91.     gestaltConnMgrPresent        = 0,
  92.     gestaltConnMgrCMSearchFix    = 1,                            /* Fix to CMAddSearch?     */
  93.     gestaltConnMgrErrorString    = 2,                            /* has CMGetErrorString() */
  94.     gestaltConnMgrMultiAsyncIO    = 3                                /* CMNewIOPB, CMDisposeIOPB, CMPBRead, CMPBWrite, CMPBIOKill */
  95. };
  96.  
  97. enum {
  98.     gestaltComponentMgr            = 'cpnt'
  99. };
  100.  
  101. enum {
  102.     gestaltColorPickerVersion    = 'cpkr',                        /* returns version of ColorPicker */
  103.     gestaltColorPicker            = 'cpkr'
  104. };
  105.  
  106. enum {
  107.     gestaltNativeCPUtype        = 'cput',                        /* Native CPU type                                       */
  108.     gestaltCPU68000                = 1,                            /* Various 68k CPUs...     */
  109.     gestaltCPU68010                = 2,
  110.     gestaltCPU68020                = 3,
  111.     gestaltCPU68030                = 4,
  112.     gestaltCPU68040                = 5,
  113.     gestaltCPU601                = 0x101,                        /* IBM 601                                                 */
  114.     gestaltCPU603                = 0x103,
  115.     gestaltCPU604                = 0x104
  116. };
  117.  
  118. enum {
  119.     gestaltCRMAttr                = 'crm ',                        /* comm resource mgr attributes */
  120.     gestaltCRMPresent            = 0,
  121.     gestaltCRMPersistentFix        = 1,                            /* fix for persistent tools */
  122.     gestaltCRMToolRsrcCalls        = 2                                /* has CRMGetToolResource/ReleaseToolResource */
  123. };
  124.  
  125. enum {
  126.     gestaltControlStripVersion    = 'csvr'
  127. };
  128.  
  129. enum {
  130.     gestaltCTBVersion            = 'ctbv'
  131. };
  132.  
  133. enum {
  134.     gestaltDBAccessMgrAttr        = 'dbac',                        /* Database Access Mgr attributes */
  135.     gestaltDBAccessMgrPresent    = 0                                /* True if Database Access Mgr present */
  136. };
  137.  
  138. enum {
  139.     gestaltDictionaryMgrAttr    = 'dict',                        /* Dictionary Manager attributes */
  140.     gestaltDictionaryMgrPresent    = 0                                /* Dictionary Manager attributes */
  141. };
  142.  
  143. enum {
  144.     gestaltDITLExtAttr            = 'ditl',                        /* AppenDITL, etc. calls from CTB */
  145.     gestaltDITLExtPresent        = 0                                /* True if calls are present */
  146. };
  147.  
  148. enum {
  149.     gestaltDisplayMgrAttr        = 'dply',                        /* Display Manager attributes */
  150.     gestaltDisplayMgrPresent    = 0                                /* True if Display Mgr is present */
  151. };
  152.  
  153. enum {
  154.     gestaltDisplayMgrVers        = 'dplv'
  155. };
  156.  
  157. enum {
  158.     gestaltDragMgrAttr            = 'drag',                        /* Drag Manager attributes */
  159.     gestaltDragMgrPresent        = 0,                            /* Drag Manager is present */
  160.     gestaltDragMgrFloatingWind    = 1,                            /* Drag Manager supports floating windows */
  161.     gestaltPPCDragLibPresent    = 2                                /* Drag Manager PPC DragLib is present */
  162. };
  163.  
  164. enum {
  165.     gestaltEasyAccessAttr        = 'easy',                        /* Easy Access attributes */
  166.     gestaltEasyAccessOff        = 0,                            /* if Easy Access present, but off (no icon) */
  167.     gestaltEasyAccessOn            = 1,                            /* if Easy Access "On" */
  168.     gestaltEasyAccessSticky        = 2,                            /* if Easy Access "Sticky" */
  169.     gestaltEasyAccessLocked        = 3                                /* if Easy Access "Locked" */
  170. };
  171.  
  172. enum {
  173.     gestaltEditionMgrAttr        = 'edtn',                        /* Edition Mgr attributes */
  174.     gestaltEditionMgrPresent    = 0,                            /* True if Edition Mgr present */
  175.     gestaltEditionMgrTranslationAware = 1                        /* True if edition manager is translation manager aware */
  176. };
  177.  
  178. enum {
  179.     gestaltAppleEventsAttr        = 'evnt',                        /* Apple Events attributes */
  180.     gestaltAppleEventsPresent    = 0,                            /* True if Apple Events present */
  181.     gestaltScriptingSupport        = 1,
  182.     gestaltOSLInSystem            = 2                                /* OSL is in system so don’t use the one linked in to app */
  183. };
  184.  
  185. enum {
  186.     gestaltFinderAttr            = 'fndr',                        /* Finder attributes */
  187.     gestaltFinderDropEvent        = 0,                            /* Finder recognizes drop event */
  188.     gestaltFinderMagicPlacement    = 1,                            /* Finder supports magic icon placement */
  189.     gestaltFinderCallsAEProcess    = 2,                            /* Finder calls AEProcessAppleEvent */
  190.     gestaltOSLCompliantFinder    = 3,                            /* Finder is scriptable and recordable */
  191.     gestaltFinderSupports4GBVolumes = 4,                        /* Finder correctly handles 4GB volumes */
  192.     gestaltFinderHandlesCFMFailures = 5,                        /* Finder handles Code Fragment Manager errors  */
  193.     gestaltFinderHasClippings    = 6                                /* Finder supports Drag Manager clipping files */
  194. };
  195.  
  196. enum {
  197.     gestaltFindFolderAttr        = 'fold',                        /* Folder Mgr attributes */
  198.     gestaltFindFolderPresent    = 0                                /* True if Folder Mgr present */
  199. };
  200.  
  201. enum {
  202.     gestaltFontMgrAttr            = 'font',                        /* Font Mgr attributes */
  203.     gestaltOutlineFonts            = 0                                /* True if Outline Fonts supported */
  204. };
  205.  
  206. enum {
  207.     gestaltFPUType                = 'fpu ',                        /* fpu type */
  208.     gestaltNoFPU                = 0,                            /* no FPU */
  209.     gestalt68881                = 1,                            /* 68881 FPU */
  210.     gestalt68882                = 2,                            /* 68882 FPU */
  211.     gestalt68040FPU                = 3                                /* 68040 built-in FPU */
  212. };
  213.  
  214. enum {
  215.     gestaltFSAttr                = 'fs  ',                        /* file system attributes */
  216.     gestaltFullExtFSDispatching    = 0,                            /* has really cool new HFSDispatch dispatcher */
  217.     gestaltHasFSSpecCalls        = 1,                            /* has FSSpec calls */
  218.     gestaltHasFileSystemManager    = 2,                            /* has a file system manager */
  219.     gestaltFSMDoesDynamicLoad    = 3,                            /* file system manager supports dynamic loading */
  220.     gestaltFSSupports4GBVols    = 4,                            /* file system supports 4 gigabyte volumes */
  221.     gestaltFSSupports2TBVols    = 5,                            /* file system supports 2 terabyte volumes */
  222.     gestaltHasExtendedDiskInit    = 6                                /* has extended Disk Initialization calls */
  223. };
  224.  
  225. enum {
  226.     gestaltFXfrMgrAttr            = 'fxfr',                        /* file transfer manager attributes */
  227.     gestaltFXfrMgrPresent        = 0,
  228.     gestaltFXfrMgrMultiFile        = 1,                            /* supports FTSend and FTReceive */
  229.     gestaltFXfrMgrErrorString    = 2                                /* supports FTGetErrorString */
  230. };
  231.  
  232. enum {
  233.     gestaltHardwareAttr            = 'hdwr',                        /* hardware attributes */
  234.     gestaltHasVIA1                = 0,                            /* VIA1 exists */
  235.     gestaltHasVIA2                = 1,                            /* VIA2 exists */
  236.     gestaltHasASC                = 3,                            /* Apple Sound Chip exists */
  237.     gestaltHasSCC                = 4,                            /* SCC exists */
  238.     gestaltHasSCSI                = 7,                            /* SCSI exists */
  239.     gestaltHasSoftPowerOff        = 19,                            /* Capable of software power off */
  240.     gestaltHasSCSI961            = 21,                            /* 53C96 SCSI controller on internal bus */
  241.     gestaltHasSCSI962            = 22,                            /* 53C96 SCSI controller on external bus */
  242.     gestaltHasUniversalROM        = 24                            /* Do we have a Universal ROM? */
  243. };
  244.  
  245. enum {
  246.     gestaltHelpMgrAttr            = 'help',                        /* Help Mgr Attributes */
  247.     gestaltHelpMgrPresent        = 0,                            /* true if help mgr is present */
  248.     gestaltHelpMgrExtensions    = 1                                /* true if help mgr extensions are installed */
  249. };
  250.  
  251. enum {
  252.     gestaltCompressionMgr        = 'icmp'
  253. };
  254.  
  255. enum {
  256.     gestaltIconUtilitiesAttr    = 'icon',                        /* Icon Utilities attributes  (Note: available in System 7.0, despite gestalt) */
  257.     gestaltIconUtilitiesPresent    = 0                                /* true if icon utilities are present */
  258. };
  259.  
  260. enum {
  261.     gestaltKeyboardType            = 'kbd ',                        /* keyboard type */
  262.     gestaltMacKbd                = 1,
  263.     gestaltMacAndPad            = 2,
  264.     gestaltMacPlusKbd            = 3,
  265.     gestaltExtADBKbd            = 4,
  266.     gestaltStdADBKbd            = 5,
  267.     gestaltPrtblADBKbd            = 6,
  268.     gestaltPrtblISOKbd            = 7,
  269.     gestaltStdISOADBKbd            = 8,
  270.     gestaltExtISOADBKbd            = 9,
  271.     gestaltADBKbdII                = 10,
  272.     gestaltADBISOKbdII            = 11,
  273.     gestaltPwrBookADBKbd        = 12,
  274.     gestaltPwrBookISOADBKbd        = 13,
  275.     gestaltAppleAdjustKeypad    = 14,
  276.     gestaltAppleAdjustADBKbd    = 15,
  277.     gestaltAppleAdjustISOKbd    = 16,
  278.     gestaltJapanAdjustADBKbd    = 17,                            /* Japan Adjustable Keyboard */
  279.     gestaltPwrBkExtISOKbd        = 20,                            /* PowerBook Extended International Keyboard with function keys */
  280.     gestaltPwrBkExtJISKbd        = 21,                            /* PowerBook Extended Japanese Keyboard with function keys         */
  281.     gestaltPwrBkExtADBKbd        = 24                            /* PowerBook Extended Domestic Keyboard with function keys         */
  282. };
  283.  
  284. enum {
  285.     gestaltLowMemorySize        = 'lmem'
  286. };
  287.  
  288. enum {
  289.     gestaltLogicalRAMSize        = 'lram'
  290. };
  291.  
  292. enum {
  293.     gestaltMachineType            = 'mach',                        /* machine type */
  294.     gestaltClassic                = 1,
  295.     gestaltMacXL                = 2,
  296.     gestaltMac512KE                = 3,
  297.     gestaltMacPlus                = 4,
  298.     gestaltMacSE                = 5,
  299.     gestaltMacII                = 6,
  300.     gestaltMacIIx                = 7,
  301.     gestaltMacIIcx                = 8,
  302.     gestaltMacSE030                = 9,
  303.     gestaltPortable                = 10,
  304.     gestaltMacIIci                = 11,
  305.     gestaltMacIIfx                = 13,
  306.     gestaltMacClassic            = 17,
  307.     gestaltMacIIsi                = 18,
  308.     gestaltMacLC                = 19,
  309.     gestaltQuadra900            = 20,
  310.     gestaltPowerBook170            = 21,
  311.     gestaltQuadra700            = 22,
  312.     gestaltClassicII            = 23,
  313.     gestaltPowerBook100            = 24,
  314.     gestaltPowerBook140            = 25,
  315.     gestaltQuadra950            = 26,
  316.     gestaltMacLCIII                = 27,
  317.     gestaltPerforma450            = 27,
  318.     gestaltPowerBookDuo210        = 29,
  319.     gestaltMacCentris650        = 30,
  320.     gestaltPowerBookDuo230        = 32,
  321.     gestaltPowerBook180            = 33,
  322.     gestaltPowerBook160            = 34,
  323.     gestaltMacQuadra800            = 35,
  324.     gestaltMacQuadra650            = 36,
  325.     gestaltMacLCII                = 37,
  326.     gestaltPowerBookDuo250        = 38,
  327.     gestaltAWS9150_80            = 39,
  328.     gestaltMacIIvi                = 44,
  329.     gestaltPerforma600            = 45,
  330.     gestaltMacIIvm                = 45,
  331.     gestaltMacIIvx                = 48,
  332.     gestaltMacColorClassic        = 49,
  333.     gestaltPerforma250            = 49,
  334.     gestaltPowerBook165c        = 50,
  335.     gestaltMacCentris610        = 52,
  336.     gestaltMacQuadra610            = 53,
  337.     gestaltPowerBook145            = 54,
  338.     gestaltMacLC520                = 56,
  339.     gestaltMacCentris660AV        = 60,
  340.     gestaltPerforma46x            = 62,
  341.     gestaltPowerMac8100_80        = 65,                            /* Power Macintosh 8100/80 */
  342.     gestaltPowerBook180c        = 71,
  343.     gestaltPowerMac6100_60        = 75,                            /* Power Macintosh 6100/60 */
  344.     gestaltPowerBookDuo270c        = 77,
  345.     gestaltMacQuadra840AV        = 78,
  346.     gestaltPerforma550            = 80,
  347.     gestaltPowerBook165            = 84,
  348.     gestaltMacTV                = 88,
  349.     gestaltMacLC475                = 89,
  350.     gestaltPerforma47x            = 89,
  351.     gestaltMacLC575                = 92,
  352.     gestaltMacQuadra605            = 94,
  353.     gestaltPowerMac7100_66        = 112                            /* Power Macintosh 7100/66 */
  354. };
  355.  
  356. enum {
  357.     kMachineNameStrID            = -16395
  358. };
  359.  
  360. enum {
  361.     gestaltMachineIcon            = 'micn'
  362. };
  363.  
  364. enum {
  365.     gestaltMiscAttr                = 'misc',                        /* miscellaneous attributes */
  366.     gestaltScrollingThrottle    = 0,                            /* true if scrolling throttle on */
  367.     gestaltSquareMenuBar        = 2                                /* true if menu bar is square */
  368. };
  369.  
  370. /*
  371.     The name gestaltMixedModeVersion for the 'mixd' selector is semantically incorrect.
  372.     The same selector has been renamed gestaltMixedModeAttr to properly reflect the 
  373.     Inside Mac: PowerPC System Software documentation.  The gestaltMixedModeVersion
  374.     symbol has been preserved only for backwards compatibility.
  375.     
  376.     Developers are forewarned that gestaltMixedModeVersion has a limited lifespan and 
  377.     will be removed in a future release of the Interfaces.
  378.  
  379.     For the first version of Mixed Mode, both meanings of the 'mixd' selector are
  380.     functionally identical.  They both return 0x00000001.  In subsequent versions
  381.     of Mixed Mode, however, the 'mixd' selector will not respond with an increasing
  382.     version number, but rather, with 32 attribute bits with various meanings.
  383. */
  384. enum {
  385.     gestaltMixedModeVersion        = 'mixd'
  386. };
  387.  
  388. enum {
  389.     gestaltMixedModeAttr        = 'mixd',                        /* returns Mixed Mode attributes */
  390.     gestaltPowerPCAware            = 0                                /* true if Mixed Mode Manager supports PowerPC */
  391. };
  392.  
  393. enum {
  394.     gestaltMMUType                = 'mmu ',                        /* mmu type */
  395.     gestaltNoMMU                = 0,                            /* no MMU */
  396.     gestaltAMU                    = 1,                            /* address management unit */
  397.     gestalt68851                = 2,                            /* 68851 PMMU */
  398.     gestalt68030MMU                = 3,                            /* 68030 built-in MMU */
  399.     gestalt68040MMU                = 4,                            /* 68040 built-in MMU */
  400.     gestaltEMMU1                = 5                                /* Emulated MMU type 1  */
  401. };
  402.  
  403. enum {
  404.     gestaltStdNBPAttr            = 'nlup',                        /* standard nbp attributes */
  405.     gestaltStdNBPPresent        = 0
  406. };
  407.  
  408. enum {
  409.     gestaltNotificationMgrAttr    = 'nmgr',                        /* notification manager attributes */
  410.     gestaltNotificationPresent    = 0                                /* notification manager exists */
  411. };
  412.  
  413. enum {
  414.     gestaltNuBusSlotCount        = 'nubs'
  415. };
  416.  
  417. enum {
  418.     gestaltOSAttr                = 'os  ',                        /* o/s attributes */
  419.     gestaltSysZoneGrowable        = 0,                            /* system heap is growable */
  420.     gestaltLaunchCanReturn        = 1,                            /* can return from launch */
  421.     gestaltLaunchFullFileSpec    = 2,                            /* can launch from full file spec */
  422.     gestaltLaunchControl        = 3,                            /* launch control support available */
  423.     gestaltTempMemSupport        = 4,                            /* temp memory support */
  424.     gestaltRealTempMemory        = 5,                            /* temp memory handles are real */
  425.     gestaltTempMemTracked        = 6,                            /* temporary memory handles are tracked */
  426.     gestaltIPCSupport            = 7,                            /* IPC support is present */
  427.     gestaltSysDebuggerSupport    = 8                                /* system debugger support is present */
  428. };
  429.  
  430. enum {
  431.     gestaltOSTable                = 'ostt'
  432. };
  433.  
  434. enum {
  435.     gestaltPCXAttr                = 'pcxg',                        /* PC Exchange attributes */
  436.     gestaltPCXHas8and16BitFAT    = 0,                            /* PC Exchange supports both 8 and 16 bit FATs */
  437.     gestaltPCXHasProDOS            = 1                                /* PC Exchange supports ProDOS */
  438. };
  439.  
  440. enum {
  441.     gestaltLogicalPageSize        = 'pgsz'
  442. };
  443.  
  444. enum {
  445.     gestaltPopupAttr            = 'pop!',                        /* popup cdef attributes */
  446.     gestaltPopupPresent            = 0
  447. };
  448.  
  449. enum {
  450.     gestaltPowerMgrAttr            = 'powr',                        /* power manager attributes */
  451.     gestaltPMgrExists            = 0,
  452.     gestaltPMgrCPUIdle            = 1,
  453.     gestaltPMgrSCC                = 2,
  454.     gestaltPMgrSound            = 3,
  455.     gestaltPMgrDispatchExists    = 4
  456. };
  457.  
  458. /*
  459.  * PPC will return the combination of following bit fields.
  460.  * e.g. gestaltPPCSupportsRealTime +gestaltPPCSupportsIncoming + gestaltPPCSupportsOutGoing
  461.  * indicates PPC is cuurently is only supports real time delivery
  462.  * and both incoming and outgoing network sessions are allowed.
  463.  * By default local real time delivery is supported as long as PPCInit has been called.*/
  464. enum {
  465.     gestaltPPCToolboxAttr        = 'ppc ',                        /* PPC toolbox attributes */
  466.     gestaltPPCToolboxPresent    = 0x0000,                        /* PPC Toolbox is present  Requires PPCInit to be called */
  467.     gestaltPPCSupportsRealTime    = 0x1000,                        /* PPC Supports real-time delivery */
  468.     gestaltPPCSupportsIncoming    = 0x0001,                        /* PPC will deny incoming network requests */
  469.     gestaltPPCSupportsOutGoing    = 0x0002                        /* PPC will deny outgoing network requests */
  470. };
  471.  
  472. enum {
  473.     gestaltProcessorType        = 'proc',                        /* processor type */
  474.     gestalt68000                = 1,
  475.     gestalt68010                = 2,
  476.     gestalt68020                = 3,
  477.     gestalt68030                = 4,
  478.     gestalt68040                = 5
  479. };
  480.  
  481. enum {
  482.     gestaltParityAttr            = 'prty',                        /* parity attributes */
  483.     gestaltHasParityCapability    = 0,                            /* has ability to check parity */
  484.     gestaltParityEnabled        = 1                                /* parity checking enabled */
  485. };
  486.  
  487. enum {
  488.     gestaltQuickdrawVersion        = 'qd  ',                        /* quickdraw version */
  489.     gestaltOriginalQD            = 0x000,                        /* original 1-bit QD */
  490.     gestalt8BitQD                = 0x100,                        /* 8-bit color QD */
  491.     gestalt32BitQD                = 0x200,                        /* 32-bit color QD */
  492.     gestalt32BitQD11            = 0x210,                        /* 32-bit color QDv1.1 */
  493.     gestalt32BitQD12            = 0x220,                        /* 32-bit color QDv1.2 */
  494.     gestalt32BitQD13            = 0x230                            /* 32-bit color QDv1.3 */
  495. };
  496.  
  497. enum {
  498.     gestaltQuickdrawFeatures    = 'qdrw',                        /* quickdraw features */
  499.     gestaltHasColor                = 0,                            /* color quickdraw present */
  500.     gestaltHasDeepGWorlds        = 1,                            /* GWorlds can be deeper than 1-bit */
  501.     gestaltHasDirectPixMaps        = 2,                            /* PixMaps can be direct (16 or 32 bit) */
  502.     gestaltHasGrayishTextOr        = 3,                            /* supports text mode grayishTextOr */
  503.     gestaltSupportsMirroring    = 4                                /* Supports video mirroring via the Display Manager. */
  504. };
  505.  
  506. enum {
  507.     gestaltQuickTimeVersion        = 'qtim',                        /* returns version of QuickTime */
  508.     gestaltQuickTime            = 'qtim'
  509. };
  510.  
  511. enum {
  512.     gestaltQuickTimeFeatures    = 'qtrs',
  513.     gestaltPPCQuickTimeLibPresent = 0                            /* PowerPC QuickTime glue library is present */
  514. };
  515.  
  516. enum {
  517.     gestaltPhysicalRAMSize        = 'ram '
  518. };
  519.  
  520. enum {
  521.     gestaltRBVAddr                = 'rbv '
  522. };
  523.  
  524. enum {
  525.     gestaltROMSize                = 'rom '
  526. };
  527.  
  528. enum {
  529.     gestaltROMVersion            = 'romv'
  530. };
  531.  
  532. enum {
  533.     gestaltResourceMgrAttr        = 'rsrc',                        /* Resource Mgr attributes */
  534.     gestaltPartialRsrcs            = 0                                /* True if partial resources exist */
  535. };
  536.  
  537. enum {
  538.     gestaltRealtimeMgrAttr        = 'rtmr',                        /* Realtime manager attributes            */
  539.     gestaltRealtimeMgrPresent    = 0                                /* true if the Realtime manager is present     */
  540. };
  541.  
  542. enum {
  543.     gestaltSCCReadAddr            = 'sccr'
  544. };
  545.  
  546. enum {
  547.     gestaltSCCWriteAddr            = 'sccw'
  548. };
  549.  
  550. enum {
  551.     gestaltScrapMgrAttr            = 'scra',                        /* Scrap Manager attributes */
  552.     gestaltScrapMgrTranslationAware = 0                            /* True if scrap manager is translation aware */
  553. };
  554.  
  555. enum {
  556.     gestaltScriptMgrVersion        = 'scri'
  557. };
  558.  
  559. enum {
  560.     gestaltScriptCount            = 'scr#'
  561. };
  562.  
  563. enum {
  564.     gestaltSCSI                    = 'scsi',                        /* SCSI Manager attributes */
  565.     gestaltAsyncSCSI            = 0,                            /* Supports Asynchronous SCSI */
  566.     gestaltAsyncSCSIINROM        = 1,                            /* Async scsi is in ROM (available for booting) */
  567.     gestaltSCSISlotBoot            = 2                                /* ROM supports Slot-style PRAM for SCSI boots (PDM and later) */
  568. };
  569.  
  570. enum {
  571.     gestaltControlStripAttr        = 'sdev',                        /* Control Strip attributes */
  572.     gestaltControlStripExists    = 0,
  573.     gestaltControlStripVersionFixed = 1
  574. };
  575.  
  576. enum {
  577.     gestaltSerialAttr            = 'ser ',                        /* Serial attributes */
  578.     gestaltHasGPIaToDCDa        = 0,                            /* GPIa connected to DCDa*/
  579.     gestaltHasGPIaToRTxCa        = 1,                            /* GPIa connected to RTxCa clock input*/
  580.     gestaltHasGPIbToDCDb        = 2                                /* GPIb connected to DCDb */
  581. };
  582.  
  583. enum {
  584.     gestaltNuBusConnectors        = 'sltc'
  585. };
  586.  
  587. enum {
  588.     gestaltSlotAttr                = 'slot',                        /* slot attributes  */
  589.     gestaltSlotMgrExists        = 0,                            /* true is slot mgr exists  */
  590.     gestaltNuBusPresent            = 1,                            /* NuBus slots are present  */
  591.     gestaltSESlotPresent        = 2,                            /* SE PDS slot present  */
  592.     gestaltSE30SlotPresent        = 3,                            /* SE/30 slot present  */
  593.     gestaltPortableSlotPresent    = 4                                /* Portable’s slot present  */
  594. };
  595.  
  596. enum {
  597.     gestaltFirstSlotNumber        = 'slt1'
  598. };
  599.  
  600. enum {
  601.     gestaltSoundAttr            = 'snd ',                        /* sound attributes */
  602.     gestaltStereoCapability        = 0,                            /* sound hardware has stereo capability */
  603.     gestaltStereoMixing            = 1,                            /* stereo mixing on external speaker */
  604.     gestaltSoundIOMgrPresent    = 3,                            /* The Sound I/O Manager is present */
  605.     gestaltBuiltInSoundInput    = 4,                            /* built-in Sound Input hardware is present */
  606.     gestaltHasSoundInputDevice    = 5,                            /* Sound Input device available */
  607.     gestaltPlayAndRecord        = 6,                            /* built-in hardware can play and record simultaneously */
  608.     gestalt16BitSoundIO            = 7,                            /* sound hardware can play and record 16-bit samples */
  609.     gestaltStereoInput            = 8,                            /* sound hardware can record stereo */
  610.     gestaltLineLevelInput        = 9,                            /* sound input port requires line level */
  611. /* the following bits are not defined prior to Sound Mgr 3.0 */
  612.     gestaltSndPlayDoubleBuffer    = 10,                            /* SndPlayDoubleBuffer available, set by Sound Mgr 3.0 and later */
  613.     gestaltMultiChannels        = 11,                            /* multiple channel support, set by Sound Mgr 3.0 and later */
  614.     gestalt16BitAudioSupport    = 12                            /* 16 bit audio data supported, set by Sound Mgr 3.0 and later */
  615. };
  616.  
  617. enum {
  618.     gestaltStandardFileAttr        = 'stdf',                        /* Standard File attributes */
  619.     gestaltStandardFile58        = 0,                            /* True if selectors 5-8 (StandardPutFile-CustomGetFile) are supported */
  620.     gestaltStandardFileTranslationAware = 1,                    /* True if standard file is translation manager aware */
  621.     gestaltStandardFileHasColorIcons = 2,                        /* True if standard file has 16x16 color icons */
  622.     gestaltStandardFileUseGenericIcons = 3,                        /* Standard file LDEF to use only the system generic icons if true */
  623.     gestaltStandardFileHasDynamicVolumeAllocation = 4            /* True if standard file supports more than 20 volumes */
  624. };
  625.  
  626. enum {
  627.     gestaltSysArchitecture        = 'sysa',                        /* Native System Architecture */
  628.     gestalt68k                    = 1,                            /* Motorola MC68k architecture */
  629.     gestaltPowerPC                = 2                                /* IBM PowerPC architecture */
  630. };
  631.  
  632. enum {
  633.     gestaltSystemVersion        = 'sysv'
  634. };
  635.  
  636. enum {
  637.     gestaltTSMgrVersion            = 'tsmv'
  638. };
  639.  
  640. enum {
  641.     gestaltTSMgrAttr            = 'tsma',                        /* Text Services Mgr attributes, if present */
  642.     gestaltTSMDisplayMgrAwareBit = 0                            /* TSM knows about display manager */
  643. };
  644.  
  645. enum {
  646.     gestaltTextEditVersion        = 'te  ',                        /* TextEdit version number */
  647.     gestaltTE1                    = 1,                            /* TextEdit in MacIIci ROM */
  648.     gestaltTE2                    = 2,                            /* TextEdit with 6.0.4 Script Systems on MacIIci (Script bug fixes for MacIIci) */
  649.     gestaltTE3                    = 3,                            /* TextEdit with 6.0.4 Script Systems all but MacIIci */
  650.     gestaltTE4                    = 4,                            /* TextEdit in System 7.0 */
  651.     gestaltTE5                    = 5                                /* TextWidthHook available in TextEdit */
  652. };
  653.  
  654. enum {
  655.     gestaltTEAttr                = 'teat',                        /* TextEdit attributes */
  656.     gestaltTEHasGetHiliteRgn    = 0                                /* TextEdit has TEGetHiliteRgn */
  657. };
  658.  
  659. enum {
  660.     gestaltTermMgrAttr            = 'term',                        /* terminal mgr attributes */
  661.     gestaltTermMgrPresent        = 0,
  662.     gestaltTermMgrErrorString    = 2
  663. };
  664.  
  665. enum {
  666.     gestaltTimeMgrVersion        = 'tmgr',                        /* time mgr version */
  667.     gestaltStandardTimeMgr        = 1,                            /* standard time mgr is present */
  668.     gestaltRevisedTimeMgr        = 2,                            /* revised time mgr is present */
  669.     gestaltExtendedTimeMgr        = 3                                /* extended time mgr is present */
  670. };
  671.  
  672. enum {
  673.     gestaltSpeechAttr            = 'ttsc',                        /* Speech Manager attributes */
  674.     gestaltSpeechMgrPresent        = 0,                            /* bit set indicates that Speech Manager exists */
  675.     gestaltSpeechHasPPCGlue        = 1                                /* bit set indicates that native PPC glue for Speech Manager API exists */
  676. };
  677.  
  678. enum {
  679.     gestaltToolboxTable            = 'tbtt'
  680. };
  681.  
  682. enum {
  683.     gestaltThreadMgrAttr        = 'thds',                        /* Thread Manager attributes */
  684.     gestaltThreadMgrPresent        = 0,                            /* bit true if Thread Mgr is present */
  685.     gestaltSpecificMatchSupport    = 1,                            /* bit true if Thread Mgr supports exact match creation option */
  686.     gestaltThreadsLibraryPresent = 2                            /* bit true if Thread Mgr shared library is present */
  687. };
  688.  
  689. enum {
  690.     gestaltTVAttr                = 'tv  ',                        /* TV version                                        <EX16>     */
  691.     gestaltHasTVTuner            = 0,                            /* supports Philips FL1236F video tuner                <EX16>     */
  692.     gestaltHasSoundFader        = 1,                            /* supports Philips TEA6330 Sound Fader chip        <EX16>     */
  693.     gestaltHasHWClosedCaptioning = 2,                            /* supports Philips SAA5252 Closed Captioning        <EX16>     */
  694.     gestaltHasIRRemote            = 3,                            /* supports CyclopsII Infra Red Remote control        <EX16>     */
  695.     gestaltHasVidDecoderScaler    = 4,                            /* supports Philips SAA7194 Video Decoder/Scaler    <EX16>     */
  696.     gestaltHasStereoDecoder        = 5                                /* supports Sony SBX1637A-01 stereo decoder            <EX16>     */
  697. };
  698.  
  699. enum {
  700.     gestaltVersion                = 'vers'
  701. };
  702.  
  703. enum {
  704.     gestaltVIA1Addr                = 'via1'
  705. };
  706.  
  707. enum {
  708.     gestaltVIA2Addr                = 'via2'
  709. };
  710.  
  711. enum {
  712.     gestaltVMAttr                = 'vm  ',                        /* virtual memory attributes */
  713.     gestaltVMPresent            = 0                                /* true if virtual memory is present */
  714. };
  715.  
  716. enum {
  717.     gestaltTranslationAttr        = 'xlat',                        /* Translation Manager attributes */
  718.     gestaltTranslationMgrExists    = 0,                            /* True if translation manager exists */
  719.     gestaltTranslationMgrHintOrder = 1,                            /* True if hint order reversal in effect */
  720.     gestaltTranslationPPCAvail    = 2,
  721.     gestaltTranslationGetPathAPIAvail = 3
  722. };
  723.  
  724. enum {
  725.     gestaltExtToolboxTable        = 'xttt'
  726. };
  727.  
  728. typedef pascal OSErr (*SelectorFunctionProcPtr)(OSType selector, long *response);
  729.  
  730. #if GENERATINGCFM
  731. typedef UniversalProcPtr SelectorFunctionUPP;
  732. #else
  733. typedef SelectorFunctionProcPtr SelectorFunctionUPP;
  734. #endif
  735.  
  736. enum {
  737.     uppSelectorFunctionProcInfo = kPascalStackBased
  738.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  739.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(OSType)))
  740.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(long*)))
  741. };
  742.  
  743. #if GENERATINGCFM
  744. #define NewSelectorFunctionProc(userRoutine)        \
  745.         (SelectorFunctionUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppSelectorFunctionProcInfo, GetCurrentArchitecture())
  746. #else
  747. #define NewSelectorFunctionProc(userRoutine)        \
  748.         ((SelectorFunctionUPP) (userRoutine))
  749. #endif
  750.  
  751. #if GENERATINGCFM
  752. #define CallSelectorFunctionProc(userRoutine, selector, response)        \
  753.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppSelectorFunctionProcInfo, (selector), (response))
  754. #else
  755. #define CallSelectorFunctionProc(userRoutine, selector, response)        \
  756.         (*(userRoutine))((selector), (response))
  757. #endif
  758.  
  759. #if SystemSevenOrLater
  760.  
  761. #if !GENERATINGCFM
  762. #pragma parameter __D0 Gestalt(__D0, __A1)
  763. #endif
  764. extern pascal OSErr Gestalt(OSType selector, long *response)
  765.  TWOWORDINLINE(0xA1AD, 0x2288);
  766.  
  767. #if !GENERATINGCFM
  768. #pragma parameter __D0 NewGestalt(__D0, __A0)
  769. #endif
  770. extern pascal OSErr NewGestalt(OSType selector, SelectorFunctionUPP gestaltFunction)
  771.  ONEWORDINLINE(0xA3AD);
  772.  
  773. #if !GENERATINGCFM
  774. #pragma parameter __D0 ReplaceGestalt(__D0, __A0, __A1)
  775. #endif
  776. extern pascal OSErr ReplaceGestalt(OSType selector, SelectorFunctionUPP gestaltFunction, SelectorFunctionUPP *oldGestaltFunction)
  777.  FOURWORDINLINE(0x2F09, 0xA5AD, 0x225F, 0x2288);
  778. #else
  779. extern pascal OSErr Gestalt(OSType selector, long *response);
  780. extern pascal OSErr NewGestalt(OSType selector, SelectorFunctionUPP gestaltFunction);
  781. extern pascal OSErr ReplaceGestalt(OSType selector, SelectorFunctionUPP gestaltFunction, SelectorFunctionUPP *oldGestaltFunction);
  782. #endif
  783. #if SystemSevenFiveOrLater
  784. /* These functions are built into System 7.5, but not on earlier systems */
  785. extern pascal OSErr NewGestaltValue(OSType selector, long newValue)
  786.  THREEWORDINLINE(0x303C, 0x0401, 0xABF1);
  787. extern pascal OSErr ReplaceGestaltValue(OSType selector, long replacementValue)
  788.  THREEWORDINLINE(0x303C, 0x0402, 0xABF1);
  789. extern pascal OSErr DeleteGestaltValue(OSType selector)
  790.  THREEWORDINLINE(0x303C, 0x0203, 0xABF1);
  791. extern pascal OSErr SetGestaltValue(OSType selector, long newValue)
  792.  THREEWORDINLINE(0x303C, 0x0404, 0xABF1);
  793. #endif
  794.  
  795. #ifdef __CFM68K__
  796. #pragma lib_export off
  797. #endif
  798.  
  799. #if GENERATINGPOWERPC
  800. #pragma options align=reset
  801. #endif
  802.  
  803. #ifdef __cplusplus
  804. }
  805. #endif
  806.  
  807. #endif /* __GESTALT__ */
  808.